package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkBillCollectSalesman;
import com.ruoyi.logistic.domain.NetworkBillDetail;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkBillDetailVo;
import com.ruoyi.logistic.mapper.NetworkBillDetailMapper;
import com.ruoyi.logistic.service.NetworkBillDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;
@Service
public class NetworkBillDetailServiceImpl implements NetworkBillDetailService {
    @Autowired
    private NetworkBillDetailMapper networkBillDetailMapper;
    @Override
    public List<NetworkBillDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkBillDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkBillDetail networkBillDetail) {
        return networkBillDetailMapper.insert(networkBillDetail);
    }

    @Override
    public Boolean update(NetworkBillDetail networkBillDetail) {
        return networkBillDetailMapper.update(networkBillDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkBillDetailMapper.deleteById(id);
    }

    @Override
    public NetworkBillDetail findById(Integer id) {
        return networkBillDetailMapper.findById(id);
    }

    @Override
    public List<NetworkBillDetail> search(NetworkBillDetailVo networkBillDetailVo) {
        PageHelper.startPage(networkBillDetailVo.getPageDate());
        return networkBillDetailMapper.search(networkBillDetailVo);
    }


}
